package cn.wolfcode.wolf2w.job.task;

import cn.wolfcode.wolf2w.common.core.constant.SecurityConstants;
import cn.wolfcode.wolf2w.strategy.api.RemoteStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("redisDataPersistenceTask")
public class RedisDataPersistenceTask {

    @Autowired
    private RemoteStrategyService remoteStrategyService;

    //数据维护
    public void redisDataPersistenceHandle(){
        System.out.println("----------------redis数据维护-begin-------------------------");

        //1：从redis 查出所有hash数据

        //2：将这些hash持久化到mysql-strategy中
        remoteStrategyService.redisDataPersistenceHandle(SecurityConstants.INNER);


        System.out.println("----------------redis数据维护-end-------------------------");

    }
}
